<%@page import="com.ingenio.dao.UsuarioAdapter"%>
<%@page import="com.ingenio.business.Usuario"%>
<%@page import="com.ingenio.dao.RecuentoAdapter"%>
<%@page import="com.ingenio.dao.CategoriaAdapter"%>
<%@page import="com.ingenio.dao.RubroAdapter"%>
<%@page import="java.util.List"%>
<%@page import="com.ingenio.business.Almacen"%>
<%@page import="com.ingenio.business.Usuario"%>
<%@page import="com.ingenio.business.Recuento"%>
<%@page import="com.ingenio.business.Categoria"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Listado Recuentos Pendientes</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="Stock">
  <meta name="author" content="InGenio">

   <!--link rel="stylesheet/less" href="less/bootstrap.less" type="text/css" /-->
   <!--link rel="stylesheet/less" href="less/responsive.less" type="text/css" /-->
   <!--script src="js/less-1.3.3.min.js"></script-->
   <!--append ‘#!watch’ to the browser URL, then refresh the page. -->
	
   <link href="css/bootstrap.min.css" rel="stylesheet">
   <link href="css/style.css" rel="stylesheet">
   <link href="css/pedido.css" rel="stylesheet">
   <link href="css/principal.css" rel="stylesheet">

  <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
  <!--[if lt IE 9]>
    <script src="js/html5shiv.js"></script>
  <![endif]-->

  <!-- Fav and touch icons -->
  <link rel="shortcut icon" href="img/favicon.png">
  
  <script type="text/javascript" src="js/jquery.min.js"></script>
  <script type="text/javascript" src="js/bootstrap.min.js"></script>
  <script type="text/javascript" src="js/ABMRubros.js"></script>
  <script type="text/javascript" src="js/notify.min.js"></script>
</head>

<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
          </button>
          <a class="navbar-brand" href="index.jsp">InGenio</a>
        </div>
      </div>
    </nav>
<div class="container container--menu">
	<div class="row clearfix">
		<div class="col-md-12 column">
			<div class="page-header">
				<h1>Listado de Recuentos Pendientes</h1>
			</div>
			<div class="clear"></div>
			<div class="row">
			  <div class="col-md-2 pull-right">
				  <label class="">Fecha</label>
				  <div class='input-group date' id='datetimepicker8'>
                    <input type='text' class="form-control uneditable-input " disabled/>
                    <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span>
                    </span>
                   </div>
			  </div>
			</div>
            <table class="table table-striped table-fixedheader">
			    <thead>
					<tr>
						<th width="5%">&nbsp;</th>
						<th width="25%">Nro. Recuento</th>
						<th width="35%">Almacen</th>
						<th width="35%">Fecha Generacion</th>
					</tr>
				</thead>
				<tbody style="height:200px">
				    <%
				    Usuario u = new Usuario(1, "test", "123", null, null, null, true);
				    RecuentoAdapter ra = new RecuentoAdapter();
				    List<Recuento> recuentos = ra.devolverRecuentosPendientes(u);
				    for(Recuento re: recuentos)
			    	{ 
			    	 Almacen a = ra.devolverAlmacen(re);
			    	%>
            			<tr>
            				<td width="5%"><a href="#" class="btn btn-inverse"><i class="glyphicon glyphicon-pencil"></i></a></td>
            				<td width="25%" id="RubroID" name="RubroID" class="<%=re.getIdRecuento()%>"><%=re.getIdRecuento() %></td>
            				<td width="35%"><%=a.getDescripcion()%></td>
            				<td width="35%" ><%=re.getFechaRecuento()%></td>
            			</tr>
           		    <% } %>
				  </tbody>
			</table>
			<div class="clear"></div>
			<div>
			   	<div class="left">
					 <button type="submit" class="btn btn-primary btnRefresh">Refrescar</button>
				</div>
				<div class="right">
					 <a href="index.jsp" class="btn btn-primary">Volver al menu</a>
				</div>
			</div>
			<div class="clear"></div>
		</div>
	</div>
</div>
</body>
</html>